#include "CPelleteuse.h"

//---------------------------------------------------------------------------
__fastcall CPelleteuse::CPelleteuse(const AnsiString &asNom,
                                    const AnsiString &asDescription,
                                    const double &dPrix,
                                    const double &dPTotal,
                                    const int &Numero_Materiel)
        : CKiloutouMachine( asNom, asDescription, dPrix, ID_Materiel )
{
    m_dPoidsTotal = dPTotal;
}


//---------------------------------------------------------------------------

__fastcall CPelleteuse::CPelleteuse( void )
        : CKiloutouMachine( )
{
    m_dPoidsTotal = 0;
}

//---------------------------------------------------------------------------

void __fastcall CPelleteuse::Affecter(const AnsiString &asNom,
                                      const AnsiString &asDescription,
                                      const double &dPrix,
                                      const double &dPTotal,
                                      const int &Numero_Materiel)
{
    Nom         = asNom;
    Description = asDescription;
    Prix        = dPrix;
    PoidsTotal  = dPTotal;
    ID_Materiel = Numero_Materiel;
}

//---------------------------------------------------------------------------

AnsiString __fastcall CPelleteuse::GetLibelle( void )
{
    return Nom;
    //return "Nom " + Nom + " Description " + Description + " Prix " +Prix + " €" + " " + PoidsTotalGodet+ " " + "kg";
}

//------------------------------------------------------------------------------
bool __fastcall CPelleteuse::Ajouter( void )
{
    return GerePelleteuse( OPE_Ajout );
}

//------------------------------------------------------------------------------
bool __fastcall CPelleteuse::Modifier( void )
{
    return GerePelleteuse( OPE_Modif );
}

//------------------------------------------------------------------------------
bool __fastcall CPelleteuse::Supprimer( void )
{
    return GerePelleteuse( OPE_Suppr );
}

//------------------------------------------------------------------------------
